﻿<Page x:Class="App60.MainPage"
      xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
      xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
      xmlns:Core="using:Microsoft.Xaml.Interactions.Core"
      xmlns:Interactivity="using:Microsoft.Xaml.Interactivity"
      xmlns:Media="using:Microsoft.Xaml.Interactions.Media"
      xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
      xmlns:local="using:App60"
      xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
      mc:Ignorable="d">
    <Page.Resources>
        <Storyboard x:Name="Storyboard1" RepeatBehavior="Forever">
            <DoubleAnimation Duration="0:0:4"
                             Storyboard.TargetName="Ring1"
                             Storyboard.TargetProperty="(UIElement.RenderTransform).(CompositeTransform.Rotation)"
                             To="720"
                             d:IsOptimized="True">
                <DoubleAnimation.EasingFunction>
                    <SineEase EasingMode="EaseInOut" />
                </DoubleAnimation.EasingFunction>
            </DoubleAnimation>
            <DoubleAnimation Duration="0:0:4.5"
                             Storyboard.TargetName="Ring2"
                             Storyboard.TargetProperty="(UIElement.RenderTransform).(CompositeTransform.Rotation)"
                             To="720"
                             d:IsOptimized="True">
                <DoubleAnimation.EasingFunction>
                    <SineEase EasingMode="EaseInOut" />
                </DoubleAnimation.EasingFunction>
            </DoubleAnimation>
            <DoubleAnimation Duration="0:0:5"
                             Storyboard.TargetName="Ring3"
                             Storyboard.TargetProperty="(UIElement.RenderTransform).(CompositeTransform.Rotation)"
                             To="720"
                             d:IsOptimized="True">
                <DoubleAnimation.EasingFunction>
                    <SineEase EasingMode="EaseInOut" />
                </DoubleAnimation.EasingFunction>
            </DoubleAnimation>
            <DoubleAnimation Duration="0:0:5.5"
                             Storyboard.TargetName="Ring4"
                             Storyboard.TargetProperty="(UIElement.RenderTransform).(CompositeTransform.Rotation)"
                             To="720"
                             d:IsOptimized="True">
                <DoubleAnimation.EasingFunction>
                    <SineEase EasingMode="EaseInOut" />
                </DoubleAnimation.EasingFunction>
            </DoubleAnimation>
            <DoubleAnimation Duration="0:0:6"
                             Storyboard.TargetName="Ring5"
                             Storyboard.TargetProperty="(UIElement.RenderTransform).(CompositeTransform.Rotation)"
                             To="720"
                             d:IsOptimized="True">
                <DoubleAnimation.EasingFunction>
                    <SineEase EasingMode="EaseInOut" />
                </DoubleAnimation.EasingFunction>
            </DoubleAnimation>
            <DoubleAnimationUsingKeyFrames Storyboard.TargetName="Ring1" Storyboard.TargetProperty="(UIElement.Opacity)">
                <EasingDoubleKeyFrame KeyTime="0:0:1" Value="1" />
                <EasingDoubleKeyFrame KeyTime="0:0:4" Value="0" />
            </DoubleAnimationUsingKeyFrames>
            <DoubleAnimationUsingKeyFrames Storyboard.TargetName="Ring2" Storyboard.TargetProperty="(UIElement.Opacity)">
                <EasingDoubleKeyFrame KeyTime="0:0:1.5" Value="1" />
                <EasingDoubleKeyFrame KeyTime="0:0:4.5" Value="0" />
            </DoubleAnimationUsingKeyFrames>
            <DoubleAnimationUsingKeyFrames Storyboard.TargetName="Ring3" Storyboard.TargetProperty="(UIElement.Opacity)">
                <EasingDoubleKeyFrame KeyTime="0:0:2" Value="1" />
                <EasingDoubleKeyFrame KeyTime="0:0:5" Value="0" />
            </DoubleAnimationUsingKeyFrames>
            <DoubleAnimationUsingKeyFrames Storyboard.TargetName="Ring4" Storyboard.TargetProperty="(UIElement.Opacity)">
                <EasingDoubleKeyFrame KeyTime="0:0:2.5" Value="1" />
                <EasingDoubleKeyFrame KeyTime="0:0:5.5" Value="0" />
            </DoubleAnimationUsingKeyFrames>
            <DoubleAnimationUsingKeyFrames Storyboard.TargetName="Ring5" Storyboard.TargetProperty="(UIElement.Opacity)">
                <EasingDoubleKeyFrame KeyTime="0:0:3" Value="1" />
                <EasingDoubleKeyFrame KeyTime="0:0:6" Value="0" />
            </DoubleAnimationUsingKeyFrames>
        </Storyboard>
    </Page.Resources>

    <Interactivity:Interaction.Behaviors>
        <Core:EventTriggerBehavior EventName="Loaded">
            <Media:ControlStoryboardAction Storyboard="{StaticResource Storyboard1}" />
        </Core:EventTriggerBehavior>
    </Interactivity:Interaction.Behaviors>

    <Grid Background="{ThemeResource ApplicationPageBackgroundThemeBrush}">

        <Grid.Resources>
            <DataTemplate x:Name="Dot1">
                <Path Width="25"
                      Height="25"
                      Data="F1 M 270.173,314.665L 329.423,320.665C 346.09,321.082 362.757,321.499 379.298,318.665C 395.84,315.832 412.257,309.749 428.673,303.665L 458.423,292.415L 483.923,279.665L 517.423,285.165L 558.173,287.165L 559.423,283.415L 537.173,274.915L 531.673,268.915C 527.84,264.415 524.007,259.915 516.507,257.332C 509.007,254.749 497.84,254.082 489.382,254.957C 480.923,255.832 475.173,258.249 469.423,260.665C 461.257,261.915 453.09,263.165 446.048,262.749C 439.007,262.332 433.09,260.249 427.173,258.165C 428.729,244.165 430.284,230.165 430.951,208.165C 431.618,186.165 431.396,156.165 431.173,126.165L 422.507,131.499L 421.173,126.165L 412.507,136.165L 411.173,130.165L 401.84,144.165L 398.507,140.165L 393.173,154.165L 386.507,152.832L 381.84,166.832L 377.84,164.165L 372.507,180.832L 365.173,180.165L 365.84,195.499L 360.507,198.832L 361.173,204.832L 357.173,208.165L 359.173,216.165L 346.507,260.832L 355.59,216.249L 353.59,207.999L 358.09,202.749L 357.59,196.249L 364.09,193.249L 362.835,176.218L 371.46,176.218L 377.085,153.968C 371.919,135.093 366.752,116.218 363.752,101.78C 360.752,87.3428 359.919,77.3428 359.085,67.3428L 352.419,74.6755L 348.752,66.3422L 340.419,80.6755L 338.752,73.0089L 331.752,94.3422L 327.085,84.6755L 324.419,104.342L 320.419,98.0089L 319.752,115.342L 314.752,112.676L 314.085,133.009L 310.419,132.009L 330.752,275.342L 265.419,313.009L 270.173,314.665 Z"
                      Fill="#FFFFC800"
                      Stretch="Uniform" />
            </DataTemplate>
            <DataTemplate x:Name="Dot2">
                <Path Width="25"
                      Height="25"
                      Data="F1 M 601.252,548.092C 615.808,533.981 630.363,519.87 647.252,507.703C 664.141,495.537 683.363,485.314 699.752,478.314C 716.141,471.314 729.697,467.537 746.03,466.87C 762.363,466.203 781.474,468.648 800.585,471.092C 808.585,468.314 816.585,465.537 827.252,463.926C 837.919,462.314 851.252,461.87 859.752,463.092C 868.252,464.314 871.919,467.203 875.585,470.092L 882.919,477.426L 907.919,484.759L 902.585,490.426L 813.585,491.092L 771.919,510.759L 840.585,642.092L 825.252,633.426L 831.919,646.092L 818.252,636.092L 818.585,648.092L 805.585,634.759L 805.252,644.759L 792.585,630.759L 790.252,639.426L 776.919,621.759L 775.585,630.759L 761.919,612.759L 760.252,620.426L 747.252,600.759L 744.585,606.759L 710.919,561.759L 681.919,542.092L 601.252,548.092 Z "
                      Fill="#FFFFC800"
                      Stretch="Uniform" />
            </DataTemplate>
        </Grid.Resources>

        <Grid Width="200" Height="200">
            <Grid x:Name="Ring1" Opacity="0" RenderTransformOrigin="0.5,0.5">
                <Grid.RenderTransform>
                    <CompositeTransform />
                </Grid.RenderTransform>
                <ContentControl HorizontalAlignment="Center" Content="{x:Null}" ContentTemplate="{StaticResource Dot1}" />
            </Grid>
            <Grid x:Name="Ring2" Opacity="0" RenderTransformOrigin="0.5,0.5">
                <Grid.RenderTransform>
                    <CompositeTransform />
                </Grid.RenderTransform>
                <ContentControl HorizontalAlignment="Center" Content="{x:Null}" ContentTemplate="{StaticResource Dot2}" />
            </Grid>
            <Grid x:Name="Ring3" Opacity="0" RenderTransformOrigin="0.5,0.5">
                <Grid.RenderTransform>
                    <CompositeTransform />
                </Grid.RenderTransform>
                <ContentControl HorizontalAlignment="Center" Content="{x:Null}" ContentTemplate="{StaticResource Dot1}" />
            </Grid>
            <Grid x:Name="Ring4" Opacity="0" RenderTransformOrigin="0.5,0.5">
                <Grid.RenderTransform>
                    <CompositeTransform />
                </Grid.RenderTransform>
                <ContentControl HorizontalAlignment="Center" Content="{x:Null}" ContentTemplate="{StaticResource Dot2}" />
            </Grid>
            <Grid x:Name="Ring5" Opacity="0" RenderTransformOrigin="0.5,0.5">
                <Grid.RenderTransform>
                    <CompositeTransform />
                </Grid.RenderTransform>
                <ContentControl HorizontalAlignment="Center" Content="{x:Null}" ContentTemplate="{StaticResource Dot1}" />
            </Grid>
        </Grid>

    </Grid>
</Page>
